#ifndef DOZERG_ALLOC_H_20080514
#define DOZERG_ALLOC_H_20080514

#include <memory>
#include <common/impl/Config.h>

#   define __DZ_ALLOC   std::allocator

#define __DZ_BASIC_STRING(C)            std::basic_string<C,std::char_traits<C>,__DZ_ALLOC<C> >
#define __DZ_BASIC_STRING1(C,T)         std::basic_string<C,T,__DZ_ALLOC<C> >
#define __DZ_STRING                     __DZ_BASIC_STRING(char)
#define __DZ_WSTRING                    __DZ_BASIC_STRING(wchar_t)
#define __DZ_DEQUE(T)                   std::deque<T,__DZ_ALLOC<T> >
#define __DZ_LIST(T)                    std::list<T,__DZ_ALLOC<T> >
#define __DZ_VECTOR(T)                  std::vector<T,__DZ_ALLOC<T> >
    //Associative
#define __DZ_MAP(Key,Value)             std::map<Key,Value,std::less<Key>,__DZ_ALLOC<std::pair<Key,Value> > >
#define __DZ_MAP1(Key,Value,Comp)       std::map<Key,Value,Comp,__DZ_ALLOC<std::pair<Key,Value> > >
#define __DZ_MULTIMAP(Key,Value)        std::multimap<Key,Value,std::less<Key>,__DZ_ALLOC<std::pair<Key,Value> > >
#define __DZ_MULTIMAP1(Key,Value,Comp)  std::multimap<Key,Value,Comp,__DZ_ALLOC<std::pair<Key,Value> > >
#define __DZ_SET(Key)                   std::set<Key,std::less<Key>,__DZ_ALLOC<Key> >
#define __DZ_SET1(Key,Comp)             std::set<Key,Comp,__DZ_ALLOC<Key> >
#define __DZ_MULTISET(Key)              std::multiset<Key,std::less<Key>,__DZ_ALLOC<Key> >
#define __DZ_MULTISET1(Key,Comp)        std::multiset<Key,Comp,__DZ_ALLOC<Key> >
    //Stream
#define __DZ_BASIC_ISTRINGSTREAM(C)     std::basic_istringstream<C,std::char_traits<C>,__DZ_ALLOC<C> >
#define __DZ_BASIC_ISTRINGSTREAM1(C,T)  std::basic_istringstream<C,T,__DZ_ALLOC<C> >
#define __DZ_BASIC_OSTRINGSTREAM(C)     std::basic_ostringstream<C,std::char_traits<C>,__DZ_ALLOC<C> >
#define __DZ_BASIC_OSTRINGSTREAM1(C,T)  std::basic_ostringstream<C,T,__DZ_ALLOC<C> >
#define __DZ_BASIC_STRINGSTREAM(C)      std::basic_stringstream<C,std::char_traits<C>,__DZ_ALLOC<C> >
#define __DZ_BASIC_STRINGSTREAM1(C,T)   std::basic_stringstream<C,T,__DZ_ALLOC<C> >
#define __DZ_ISTRINGSTREAM              __DZ_BASIC_ISTRINGSTREAM(char)
#define __DZ_OSTRINGSTREAM              __DZ_BASIC_OSTRINGSTREAM(char)
#define __DZ_STRINGSTREAM               __DZ_BASIC_STRINGSTREAM(char)
#define __DZ_WISTRINGSTREAM             __DZ_BASIC_ISTRINGSTREAM(wchar_t)
#define __DZ_WOSTRINGSTREAM             __DZ_BASIC_OSTRINGSTREAM(wchar_t)
#define __DZ_WSTRINGSTREAM              __DZ_BASIC_STRINGSTREAM(wchar_t)
    //Extension
#define __DZ_ROPE(T)                    __gnu_cxx::rope<T,__DZ_ALLOC<T> >
#define __DZ_SLIST(T)                   __gnu_cxx::slist<T,__DZ_ALLOC<T> >

#endif
